查询批次详情
通过此接口可查询批次信息,包括批次的配置信息以及批次概况数据。
| 请求参数 | 类型 | 描述 |
|---|---|---|
| stock_id | string | 批次号 |
| query | object | 声明请求的查询参数 |
| stock_creator_mchid | string | 创建批次的商户号 |
php
$instance->v3->marketing->favor->stocks->_stock_id_->getAsync([
'stock_id' => '',
'query' => [
'stock_creator_mchid' => '',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();php
$instance->chain('v3/marketing/favor/stocks/{stock_id}')->getAsync([
'stock_id' => '',
'query' => [
'stock_creator_mchid' => '',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();php
$instance['v3/marketing/favor/stocks/{stock_id}']->getAsync([
'stock_id' => '',
'query' => [
'stock_creator_mchid' => '',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();php
$response = $instance->v3->marketing->favor->stocks->_stock_id_->get([
'stock_id' => '',
'query' => [
'stock_creator_mchid' => '',
],
]);
print_r(json_decode((string) $response->getBody(), true));php
$response = $instance->chain('v3/marketing/favor/stocks/{stock_id}')->get([
'stock_id' => '',
'query' => [
'stock_creator_mchid' => '',
],
]);
print_r(json_decode((string) $response->getBody(), true));php
$response = $instance['v3/marketing/favor/stocks/{stock_id}']->get([
'stock_id' => '',
'query' => [
'stock_creator_mchid' => '',
],
]);
print_r(json_decode((string) $response->getBody(), true));| 返回字典 | 类型 | 描述 |
|---|---|---|
| stock_name | string | 批次名称 |
| available_begin_time | string | 开始时间 |
| available_end_time | string | 结束时间 |
| stock_use_rule | object | 发放规则 |
| max_coupons | integer | 发放总上限 |
| max_amount | integer | 总预算 |
| max_amount_by_day | integer | 单天发放上限金额 |
| max_coupons_per_user | integer | 单个用户可领个数 |
| natural_person_limit | boolean | 是否开启自然人限制 |
| prevent_api_abuse | boolean | api发券防刷 |
| no_cash | boolean | 是否无资金流 |
| stock_type | string | 批次类型NORMAL | DISCOUNT | EXCHAHGE | RANDOM | DISCOUNT_CUT 枚举值之一 |
| stock_id | string | 批次号 |
| stock_creator_mchid | string | 创建批次的商户号 |
| status | string | 批次状态unactivated | audit | running | stoped | paused 枚举值之一 |
| description | string | 使用说明 |
| create_time | string | 创建时间 |
| start_time | string | 激活批次的时间 |
| stop_time | string | 终止批次的时间 |
| singleitem | boolean | 是否单品优惠 |
| cut_to_message | object | 减至批次特定信息 |
| single_price_max | integer | 可用优惠的商品最高单价 |
| cut_to_price | integer | 减至后的优惠单价 |
| distributed_coupons | integer | 已发券数量 |
| business_type | string | 业务类型MULTIUSE 枚举值 |
| available_region_list | object[] | 消费金可用地域 |
| type | string | 类型 |
| province | string | 省 |
| city | string | 市 |
| district | string | 区 |
| country | string | 国家 |
| available_industry_list | string[] | 消费金可用行业 |